/********************************************************************
    This program is based on the technique of tomato Francesco Cirillo
	http://www.pomodorotechnique.com timer is a software for this technique.

    Copyright (C) 2009  Massimo Di Giulio mailto:info@satimax.it mailto:digiulio.massimo@gmail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.



********************************************************************/

#include "StdAfx.h"
#include "MakeString.h"

MakeString::MakeString(void)
{
	this->st = gcnew String(L"");

}

MakeString::~MakeString(void)
{
    delete this->st;
}

MakeString::MakeString(MakeString^ ms)
{
	this->st = ms->st;
}

String^ MakeString::getFormatString(long num)
{
	int centesimi;
	int secondi;
	int minuti;
	int ore;

	centesimi = num % 100;

	secondi = ((num - centesimi) % 6000)/100;

	minuti = ((num - (secondi * 100) - centesimi) % 360000)/6000;

	ore = num / 360000 ;

	this->st = String::Format("{0:D2}:{1:D2}:{2:D2}.{3:D2}",ore,minuti,secondi,centesimi);

	return this->st;
	
}